import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:provide/provide.dart';
import '../../provide/details_info.dart';
//import 'package:flutter_screenutil/flutter_screenutil.dart';

import 'package:flutter_html/flutter_html.dart';

class DetailsWeb extends StatelessWidget {
  const DetailsWeb({Key key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Provide<DetailsInfoProvide>(
      builder: (context,child,detailsInfoProvide){
        var goodsDetails=detailsInfoProvide.goodsinfo.data.goodInfo.goodsDetail;
        bool isLeft = detailsInfoProvide.isLeft;
        if(isLeft){
          return  Container(
            child: Html(
              data:goodsDetails
            ),
          );
        }else{
          return Container(
            width: ScreenUtil().setWidth(750.0),
            height:ScreenUtil().setHeight(300.0),
            padding: EdgeInsets.all(10.0),
            alignment: Alignment.center,
            child: Text('---暂无评论数据--'),
          );
        }
      },
    );
  }
}
